home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 10
/
Amoszine 10 (Disk 3 of 3).adf
/
Amos_Procs.lha
/
Distance.proc
/
Distance.amosSourceCode
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS
UTF-8
Wrap
AMOS Source Code
|
1991-12-03
|
334 b
|
14 lines
Procedure DISTANCE[X1,Y1,X2,Y2]
' By John Smit
' Used to find the distance between two X Y points
' Distance returned to the Param veriable
' X1 and Y1 are one position - X2 and Y2 are the other
X=Abs(X1)-Abs(X2)
Y=Abs(Y1)-Abs(Y2)
X3=Sqr((X*X)+(Y*Y))
End Proc[X3]
'
' example
DISTANCE[1,1,5,10]
X=Param
Print X